From 2059e76f81e10aa64ef0847b69b37e34d9d7afa5 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 16 Aug 2008 21:00:19 +0000 Subject: [PATCH] API: Let list=search throw away missing titles. Lucene will sometimes give us pages that have recently been deleted. --- RELEASE-NOTES | 1 + includes/api/ApiQuerySearch.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 17098645d9..2248751efe 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -148,6 +148,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 15048) Added limit field for multivalue parameters to action=paraminfo output. * When the limit on multivalue parameters is exceeded, a warning is issued +* list=search doesn't list missing pages any more === Languages updated in 1.14 === diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 932ca5055d..85d4ec8e63 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -93,8 +93,9 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { break; } - // Silently skip broken titles - if ($result->isBrokenTitle()) continue; + // Silently skip broken and missing titles + if ($result->isBrokenTitle() || $result->isMissingRevision()) + continue; $title = $result->getTitle(); if (is_null($resultPageSet)) { -- 2.20.1